xsm: don't require configuring tools to build xen xsm blob
authorWei Liu <wei.liu2@citrix.com>
Mon, 25 Jul 2016 15:13:13 +0000 (16:13 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 1 Aug 2016 08:06:07 +0000 (09:06 +0100)
commit88d61459827ba534fec5e8f099d737cb868c5b23
treea8217ea6a81db00819aa1c3107a44634e7d53975
parent6a9b2b6f76c40bfe5f8d645d9a8f6e7db4f93be8
xsm: don't require configuring tools to build xen xsm blob

Starting from 08cffe66 ("xsm: add a default policy to .init.data") we
can attach a xsm policy blob to hypervisor. To build that policy blob
now hypervisor build system needs to enter tools directory.

The expectation for hypervisor and tools build systems is different. We
don't want xen build system to depend on configure but we want tools
build system to. That commit broke this expectation because it required
users to run configure before building hypervisor. This broke ARM build
because ARM developers normally build hypervisor and tools separately
(and possibly on different platforms). It can also break x86 if
developers don't run configure before building hypervisor with XSM on.

To fix it, move major part of tools/flask/policy/Makefile into
Makefile.common and create tools only Makefile to include that common
Makefile. Hypervisor Makefile will use Makefile.common to build xsm
policy.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Tested-by: Julien Grall <julien.grall@arm.com>
tools/flask/policy/Makefile
tools/flask/policy/Makefile.common [new file with mode: 0644]
xen/xsm/flask/Makefile